<!DOCTYPE html>
<html>
    <head>

     <script src="vue.js"></script>
    
    </head>

    <body>
    <div id="app">
        <div>{{message | toUpcase}}</div>
    </div>
    <script>
        var vm = new Vue({
            el:'#app',
            data: {
                message: 'helloworld!'
            },
            filters: {
                //将小写字母转换成大写字母
                toUpcase (value) {
                    return value ? value.toUpperCase() : '';
                }
            }
        })
    </script>
    </body>
</html>
